home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
ExcellenceV3.1_d1.adf
/
ARexx_ReadMe
< prev
next >
Wrap
Text File
|
1993-06-19
|
5KB
|
104 lines
ARexx Notes
There are several sample ARexx programs in an ARexx directory.
Each of these programs is prefaced by text explaining what
exactly the program does, and contains suggestions for
modifying it for your own use. If you want to see some
examples of how to use excellence!'s ARexx commands, be sure
to check these files out.
GetErrorText er# This is a new command which, when passed an error
code returned by an excellence! command, will
return a text description of that error in Result.
You can then immediately use Request1 to display
the error message, or Vocalize to say the error
message, etc.
Extract [n] Extract will also now accept an optional parameter
n, which is the number of characters to extract. If
no text is highlighted, then Extract n will extract
n characters from the document from the right of the
insertion point. If text is highlighted, then Extract
n will extract the highlighted text up to a maximum
of n characters. If the optional parameter n is not
specified, then Extract will extract the first word
to the right of the cursor if no text is highlighted,
or all highlighted text if any text is highlighted.
Extract will work across multiple paragraphs,
preserving the ASCII return character at paragraph
breaks.
Type You can use any reserved glossary keywords within the,
text passed to Type. This allows you to control cursor
movement by placing {left}{up}{ctrl}{down} etc.
commands within the actual text passed to type. For
example, to place the words 'top of file' at the top
of a document, you could use:
Type '{alt}{up}{ctrl}{left}Top of file{cr}'
You can even call menu options via Type, although it is
easier to do this using the Menu command. You cannot call
saved glossary entries with type. Instead reference
them as if they were an ARexx command. For example,
if you have a glossary macro which places you letterhead
at the top of the document named {letterhead}, you can
enterLetterhead as if it were an ARexx command. When
excellence! receives the message Letterhead, after making
sure it isn't an ARexx command, excellence! then checks
the glossary to see if any glossary macros exist with
that name, and if so, executes it.
RequestList This command needs its list separated by commas,
not spaces, so that it may display items containing
spaces. This is particularly useful when working with
lists supplied from the Thesaurus, as many "synonyms"
contain spaces. If you wish to have it display items
from a list of words separated by spaces, use the ARexx
Space command to transform the spaces into commas.
The commas are not displayed in the listbox nor are they
returned when a user selects an item. The first argument
is the information string. An example of using it with a
list of words separated by spaces would be: RequestList
'Select one item,'space(wordlist,1,',') where wordlist
is a list of words separated by spaces. The ThesSyn,
ThesAnt, and SpellSuggest commands return lists separated
by commas, so you can use the results of these functions
without modification. Each item in a listbox can be no
more than thirty characters long, beyond that additional
text will be truncated.
ThesSyn,
ThesAnt,
SpellSUggest These functions return their lists in a comma-separated
format, so they may be used immediately with RequestList.
If you desire to change them to a space separated format,
for easy use with ARexx's parsing and word functions,
simply use the translate command. Example:
ThesSyn 'bright'
list = translate(result,' ',',')
n = words(list)
x = subword(list,1,1)
etc....
Font This command requires a font and size separated by a
comma, therefore these parameters should be placed
inside quotes, as in Font 'topaz,11'. Otherwise, ARexx
will treat the comma as a continuation character, with
all characters after the comma being treated as
"extraneous characters."
SpellFind Returns a word that was not found in the dictionary if one
is found in Result. However, if no misspelled words are
found, it does NOT set Result to Null, but instead sets
RC to the appropriate error value.